<?php  
	session_start();
	require('../Model/mysql.php');
	require('../host_config.php');
	if ($_SESSION["flag"] != 2) {
		echo "<script language='javascript'>";
		echo "alert('You have no permission to read this page!');";
		echo "history.back();";
		echo "</script>";
		header("location:../login.php");
    }
	$mysql = new MySQL();
	$link = $mysql->connect($mysql_host, $mysql_user, $mysql_passwd, $mysql_db);
	header("refresh:60");
?>
<!DOCTYPE html>
<html>

<head>
<meta name="viewport" content="width=device-width; text/html; charset=utf-8" http-equiv="Content-Type">
<title>註冊資訊</title>
<link href="../mobile.css" rel="stylesheet" type="text/css">
</head>

<body>

<div id="banner">
	註冊資訊
	<div id="home">
		<a href="../super/select.php">
		<img alt="" class="auto-style1" height="40" src="../pic/home.png" width="40"></a>
	</div>
	<div id="logout">
		<a href="../logout.php">
		<img alt="" class="auto-style1" height="41" src="../pic/logout.png" width="41"></a>
	</div>
</div>

<div id="content">
		<br/>
		<H1 align="center">尚代通過註冊名單</H1>
                <!--<form method="post" action="confern.php">-->
                <?php
                	//$j = 0;
					//$sql = "select account, password, all_name, email, CheckTime, id from register where conferm = 0";
                	$sql = "select loginid, account, email from LoginUser where flag = 0";
					$result = $mysql->query($sql, $link);
                    echo "<table border='1' align='center'><tr align='center'>";
                    echo '<td>確認</td>';
                    echo '<td>刪除</td>';
					echo '<td>帳號</td>';
					echo '<td>e-mail</td>';
                    echo "</tr>";
                    while ($row = mysql_fetch_row($result)){
                    	echo '<td><a href="confern.php?id='.$row[0].'">確認</a></td>';
                    	echo "<td><a href='delete.php?id=".$row[0]."'>刪除</a></td>";
                        for ($i = 1; $i < mysql_num_fields($result); $i++)
                        	echo "<td>".$row[$i]."</td>";
                        echo "</tr>";
                        $j++;
                    }
			echo "</table>";
                ?>
                        <!-- <p align="center"><input type="submit" value="確認"></p>-->
                <!--</form>-->
<br /></div>
</body>

</html>
